﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:include schemaLocation="pattern-description.xsd"/>  
  
  <xs:simpleType name="abstraction-level">
    <xs:restriction base="xs:string">
      <xs:enumeration value="low"/>
      <xs:enumeration value="higher"/>
      <xs:enumeration value="normal"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:complexType name="pattern-type">
    <xs:sequence>
      <xs:element name="class" minOccurs="1" maxOccurs="1">
        <xs:complexType>
          <xs:attribute name="full-name" type="xs:string" use="required" />
        </xs:complexType>
      </xs:element>
      <xs:element name="level" type="abstraction-level" minOccurs="0" maxOccurs="1"/>
      <xs:element name="description" minOccurs="1" maxOccurs="1" type="description-type"/>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="patterns">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="pattern" maxOccurs="unbounded" type="pattern-type">
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>